using System;
using System.Text;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using WMVConvert.Metadata;
using WMVConvert.Tests.Metadata;

namespace WMVConvert.Tests
{
	[TestClass]
	public class WMAttributeFixture
	{
		[TestMethod]
		[Ignore]
		public void TestSyncronizedLyrics()
		{
			Syllable[] lyrics = { new Syllable("Hello Word", 0xFFFF) };
			WMSynchronisedLyrics wmLyrics = new WMSynchronisedLyrics(lyrics);
			IntPtr value = wmLyrics.ValueData;
		}

		[TestMethod]
		[DeploymentItem("Test.wmv")]
		public void TestMultipleValue()
		{
			using (Editor editor = new Editor(Helper.PrepareceDeploymentItem("Test.wmv","TestPicture")))
			{
				editor.Attributes.WMAuthor.Value = "Actor 1";
				editor.Attributes.WMAuthor.Value = new object[] { "Actor 1", "Actor 2" };
				IEnumerable actors = editor.Attributes.WMAuthor.Value as IEnumerable;
				Assert.IsNotNull(actors);
				Assert.AreEqual<int>(2, actors.OfType<string>().Count());
				Assert.AreEqual<int>(2, actors.OfType<string>().Count());
			}
		}

	}
}
